package com.sailing.xjpb.common.orika;

import ma.glasnost.orika.CustomConverter;
import ma.glasnost.orika.MappingContext;
import ma.glasnost.orika.metadata.Type;

import java.util.HashMap;
import java.util.Map;

/**
 * 解决map到map的拷贝
 *
 * @author YaoWei
 */
public class MapToMap extends CustomConverter<Map<String, Object>, Map<String, Object>> {

    @Override
    public Map<String, Object> convert(Map<String, Object> stringObjectMap, Type<? extends Map<String, Object>> type,
                                       MappingContext mappingContext) {
        return new HashMap<>(stringObjectMap);
    }
}